<template>
	<view class="zxh-search">
		<view class="zxh-search-input">
			<input type="text" placeholder="请输入搜索内容" v-model="value">
		</view>
		<view class="zxh-search-root" v-show="!value==''">
			<Shoping v-for="item in shop" :key="item.id" :shop="item"></Shoping>
		</view>
	</view>
</template>

<script>
	import Shoping from '../components/Shoping.vue';
	export default {
		components:{
			Shoping
		},
		data(){
			return{
				value:"",
				// 请求数据
				shop:[]
			}
		},
		mounted() {
			this.$api.zxhshop().then(res => {
				this.shop = res.data;
			})
		}
	}
</script>

<style lang="scss" scoped>
.zxh-search{
	margin: 0;
	padding: 0;
	.zxh-search-input{
		height: 80upx;
		display: flex;
		input{
			width: 90%;
			height: 60upx;
			background: #cfcfcf;
			margin: auto;
		}
	}
	.zxh-search-root{

	}
}
</style>